﻿#region Copyright (c) Nicola Gallo All rights reserved.
/*
 * All rights reserved. Reproduction of trasmission of this file, or a portion thereof,
 * is forbidden without prior written permission of Nicola Gallo.
 * 
 * Author: Nicola Gallo
 * Date: 09/04/2011
 * 
 * */
#endregion
namespace PrismMVC.ModuleA
{
    //.NET References
    using System;

    //Microsoft References.
    using Microsoft.Practices.Prism.Events;
    using Microsoft.Practices.Prism.Logging;
    using Microsoft.Practices.Prism.Modularity;
    using Microsoft.Practices.Prism.Regions;
    using Microsoft.Practices.Unity;

    //PrismMVC References.
    using PrismMVC.ModuleA.Controllers;
    using PrismMVC.ModuleA.Views;
    using PrismMVC.Shell;

    /// <summary>
    /// Initialization module.
    /// </summary>
    public class ModuleInit : Module
    {
        //Constructors

        /// <summary>
        /// Creates a new instance of <see cref="Module"/>.
        /// </summary>
        /// <param name="unityContainer">Unity container.</param>
        /// <param name="shellProxy">Shell proxy.</param>
        /// <param name="loggerFacade">Logger facade.</param>
        /// <param name="eventAggregator">Event aggregator.</param>
        public ModuleInit(IUnityContainer unityContainer, IShellProxy shellProxy, ILoggerFacade loggerFacade, IEventAggregator eventAggregator)
            : base(unityContainer, shellProxy, loggerFacade, eventAggregator) { }

        //Methods

        /// <summary>
        /// Notifies the module that it has be initialized.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();
            this.RunController<PersonsController>("ShowPersons", "mainRegion");
        }
    }
}